<?php
require_once('konfiguration.html');
$files=array("german"=>"top10000de.txt",
"english"=>"top10000en.txt",
"french"=>"top10000fr.txt",
"dutch"=>"top10000nl.txt");
$files2=array("spanish"=>"10000spanish.txt",
"italian"=>"10000italian.txt");

foreach($files2 as $language=>$file)
{
$lines=file($file);
$line=str_replace(array(0,1,2,3,4,5,6,7,8,9),'',$lines[0]);
$words=explode('  ',$line);   
   foreach($words as $word)
   { 
      
	  print $word.'<br>';
      mysql_query("INSERT INTO mostcommonwords VALUES ('$language','$word',$index)");
	  $index+=1;
	  set_time_limit(10);
   
   }

}



?>